﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcApplicationGetDataFromWCFTest.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to kick-start your ASP.NET MVC application.";


            //ServiceTestClient st = new ServiceTestClient();
            //st.GetData(33);
            //WcfService2012_12_29.CompositeType ct = new WcfService2012_12_29.CompositeType();
            //ct.BoolValue = true;
            //ct.StringValue = "dddd";
            //ct = st.GetDataUsingDataContract(ct);


            ServiceReference1.ServiceTestClient s =new ServiceReference1.ServiceTestClient();
            string ss= s.GetData(33);
            ServiceReference1.CompositeType result =
              s.GetDataUsingDataContract(new ServiceReference1.CompositeType()
              {
                  BoolValue = true,
                  StringValue = "I lvoe you"
              });
            ViewBag.aa = result.StringValue;
            return View();
    }

        public ActionResult About()
        {
            ViewBag.Message = "Your quintessential app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your quintessential contact page.";

            return View();
        }
    }
}
